﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using EstateTrackerObjects.Enumerations;

namespace EstateTrackerObjects.Collections 
{
    public class Characters : ICollection<Character>
    {
        private ICollection<Character> _character;
        public string connectionString { get; private set; }

        public Characters()
        {
            _character = new Collection<Character>();
            connectionString = EstateTrackerObjects.Properties.Settings.Default.BeronisDBConnectionStringLive;
        }

        public bool load(int loadType = (int)Enumerations.CharacterType.All)
        {
            string sql = "";
            if (loadType == (int)CharacterType.NPC)
            {
                sql += " WHERE ";
            }
            else if (loadType == (int)CharacterType.PC)
            {
                sql += "";
            }
            return true;
        }

        #region Collection Interface
        public void Add(Character item)
        {
            _character.Add(item);
        }

        public void Clear()
        {
            _character.Clear();
        }

        public bool Contains(Character item)
        {
            return _character.Contains(item);
        }

        public void CopyTo(Character[] array, int arrayIndex)
        {
            _character.CopyTo(array, arrayIndex);
        }

        public int Count
        {
            get { return _character.Count; }
        }

        public bool IsReadOnly
        {
            get { return _character.IsReadOnly; }
        }

        public bool Remove(Character item)
        {
            return _character.Remove(item);
        }

        public IEnumerator<Character> GetEnumerator()
        {
            return _character.GetEnumerator();
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return _character.GetEnumerator();
        } 
        #endregion
    }
}
